using System;
using System.ComponentModel;
using System.Collections.Specialized;

namespace qPrintComponent
{
    public sealed class qPrintQualityConverter : TypeConverter
    {
        
        public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
        {
            StringCollection col = new StringCollection();
            foreach (int i in PrintComponent.SafePrinterHandle.PrinterInfoQ.Resolutions)
            {
                if (i>0)
                    col.Add(i.ToString() + " DPI");
            }
            return new TypeConverter.StandardValuesCollection(col);
        }
        
        
        public override bool GetStandardValuesSupported(ITypeDescriptorContext context)
        {
            return true; 
        }
    }
    }

